package com.base.cn.platform.os.service.manage.planTools;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 弹窗广告Service
 *
 * @author lxr
 * @create 2020-06-28 18:44
 */
@FeignClient(name = BaseService.appName, configuration = FeignAuthConfig.class)
public interface PopupSloganService extends BaseService {

    /**
     * 分页查询弹窗广告
     *
     * @param condition
     * @param currentPage
     * @return
     */
    @RequestMapping(contextPath + "/findPopupSloganListPage")
    Map<String, Object> findPopupSloganListPage(@RequestBody Map<String, Object> condition,
                                                @RequestParam(value = "currentPage", required = false, defaultValue = "1") int currentPage);

    /**
     * 保存弹窗广告
     *
     * @param popupSlogan
     * @return
     */
    @RequestMapping(contextPath + "/savePopupSlogan")
    Map<String, Object> savePopupSlogan(@RequestBody Map<String, Object> popupSlogan);

    /**
     * 修改弹窗广告状态
     *
     * @param id
     * @param status
     * @return
     */
    @RequestMapping(contextPath + "/updatePopupSloganStatus")
    Map<String, Object> updatePopupSloganStatus(@RequestParam("id") String id,
                                                @RequestParam("status") int status);

    /**
     * 查询弹窗广告
     *
     * @param id
     * @return
     */
    @RequestMapping(contextPath + "/findPopupSloganById")
    Map<String, Object> findPopupSloganById(@RequestParam("id") BigDecimal id);

    /**
     * 获取是否有弹框
     * @param type
     * @return
     */
    @RequestMapping(contextPath + "/getIndexPopupSlogan")
    Map<String, Object> getIndexPopupSlogan(@RequestParam("type") String type, @RequestParam("userId") String userId);

}
